package Demo03;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28463
 * Date: 2022—05—16
 * Time: 18:27
 */
interface IShape{
    //int COUNT = 40;

    void draw();

/*    public default void func() {
        System.out.println("123");
    }
    public static void fun2(){
        System.out.println("456");
    }*/
}
abstract class A implements IShape{

}

class Rect implements IShape {

    @Override
    public void draw() {
        System.out.println("画一个矩形！");
    }
}
class Flower implements IShape {

    @Override
    public void draw() {
        System.out.println("画一个圆形！");
    }
}
public class Test04 {
    public static void drawMap(IShape shape){
        shape.draw();
    }
    public static void main(String[] args) {
       // IShape shape = new IShape() {}
        drawMap(new Flower());
        drawMap(new Rect());


    }

}
